<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Insert title here</title>
    <link rel="stylesheet" href="<%=request.getContextPath() %>/css/index_work.css">
    <script type="text/javascript" src="<%=request.getContextPath() %>/js/jquery-1.8.3.js"></script>
    <script type="text/javascript"></script>
</head>
<body>
<form action="add.do" method="post" enctype="multipart/form-data">
    歌曲名：　<input type="text" name="sname"><br>
    来源：　　<input type="text" name="scome"><br>
    发布时间：<input type="text" name="sdate"><br>
    歌曲文件：<input type="file" name="myFile"><br>
    歌手：　　<div id="d1"></div>
    <input type="reset" value="重置">
    <input type="submit" value="添加">
</form>

<script type="text/javascript">

    $.post("geshou.do",function (list) {
        for(var x in list){
            $("#d1").append("<input type='checkbox' name='ge' value='"+list[x].gid+"'/>"+list[x].gname)
        }
    },"json")
</script>
</body>
</html>
